// reducer 提供初始状态，最新状态的计算函数
import * as actionTypes from './constants'

const defaultState = {
    playList: [
        { a: "a" }
    ]
}

export default (state = defaultState, action) => {
    switch (action.type) {
        case actionTypes.SET_PLAYLIST:
            return {
                ...state,
                playList: action.data
            }
        default:
            return state;
    }
}